<!DOCTYPE html>
<html lang="en">
  <head>
    <title>{{ error }}</title>
    <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
    <link href="{{ url_for('static', filename='css/error.css') }}" rel="stylesheet" />
    <link
      href="{{ url_for('static', filename='lib/bootstrap/css/bootstrap.min.css') }}"
      rel="stylesheet"
    />
    <link
      href="{{ url_for('static', filename='css/themes/{}.css'.format(current_user.theme or 'default')) }}"
      rel="stylesheet"
    />
  </head>
  <body class="error-theme">
    <div class="col-middle">
      <h1 class="error-number">{{ error }}</h1>
      {% if error in [401,403] %}
      <h2>Access Denied</h2>
      {% if not current_user.is_authenticated %}
      <p>Full authentication is required to access this resource.</p>
      <br /><br />
      <a href="{{ login_url }}"
        ><button role="button" class="btn btn-secondary">Return to Login</button></a
      >
      {% else %}
      <p>Access to the specified page or resource is restricted.</p>
      <a href="{{ url_for('blueprint.route', page='dashboard') }}"
        ><button role="button" class="btn btn-secondary">Return to Dashboard</button></a
      >
      {% endif %} {% elif error == 500 %}
      <h2>Internal Server Error</h2>
      <p>
        The server encountered an unexpected condition that prevented it from fulfilling
        the request.
      </p>
      {% else %}
      <h2>Sorry but we couldn't find this page</h2>
      <p>This page you are looking for does not exist.</p>
      {% endif %}
    </div>
  </body>
</html>
